import request from "@/utils/request";

export function getCustomers(paramters) {
  return request({
    url: "api/v1/customers",
    method: "get",
    params: paramters,
    basicDataServer: true,
  });
}

export function getCustomer(id) {
  return request({
    url: "api/v1/customers/"+id,
    method: "get",
    basicDataServer: true,
  });
}

export function addCustomer(data) {
  return request({
    url: "api/v1/customers",
    method: "post",
    data: data,
    basicDataServer: true,
  });
}

export function updateCustomer(data) {
  return request({
    url: "api/v1/customers",
    method: "put",
    data: data,
    basicDataServer: true,
  });
}

export function deleteCustomer(id) {
  return request({
    url: "api/v1/customers/" + id,
    method: "delete",
    basicDataServer: true,
  });
}